<?php
include 'connect.php';
$id=$_GET['id'];

$sql ="delete from bbs where id=$id";
$boolean = mysqli_query($link,$sql);

if($boolean && mysqli_affected_rows($link)){
    echo '删除成功<a href="index.php">返回首页</a>';
} else{
    echo'删除失败';
}


mysqli_close($link);